var t,
  a = require("../../@babel/runtime/helpers/defineProperty"),
  i = require("../../res/www.a9a.cn.js"),
  e = getApp(),
  n = 2,
  o = !0;
Page({
  data: { nTitle: "我的单身团", t: "list1" },
  onLoad: function (t) {
    var a = this,
      n = this,
      o = t.t;
    e.get_config("_ZEAI").then(function (t) {
      n.setData({ color: e._ZEAI.color, rgbcolor: i.c16_rgb(e._ZEAI.color) });
    }),
      e.empty(o)
        ? wx.showModal({
            content: "请求参数错误:t",
            confirmColor: n.data.color,
            confirmText: "朕知道了",
            showCancel: !1,
            success: function (t) {
              wx.navigateBack();
            },
          })
        : (n.setData({ t: o }),
          e.get_openid().then(function (t) {
            a.init();
          }));
  },
  topbarFn: function (t) {
    var a = t.currentTarget.dataset.var;
    (a = e.empty(a) ? "list1" : a),
      this.setData({ t: a, LIST: [] }),
      (n = 2),
      (o = !0),
      this.init();
  },
  init: function () {
    var n = this;
    wx.showNavigationBarLoading(),
      (t = wx.getStorageSync("COOK_U")),
      e.ajax({
        url: "tg.php",
        data: { submitok: "TGU", t: n.data.t, openid: t.openid },
        success: function (t) {
          switch ((wx.hideNavigationBarLoading(), t.flag)) {
            case "1":
            case 1:
              wx.setNavigationBarTitle({ title: t.nTitle });
              var e,
                o = t.LIST;
              if (0 == o.length)
                n.setData({
                  nodatabox: !0,
                  top_nav: t.top_nav,
                  t: t.t,
                  cook_tg_id: t.cook_tg_id,
                });
              else
                n.setData(
                  (a((e = {}), "LIST[0]", o),
                  a(e, "nodatabox", !1),
                  a(e, "top_nav", t.top_nav),
                  a(e, "t", t.t),
                  a(e, "cook_tg_id", t.cook_tg_id),
                  e)
                );
              break;
            case "flag0":
            case "flag_1":
            case "flag2":
              wx.reLaunch({ url: "reg?t=" + t.flag });
              break;
            default:
              (t.this = n), (t.url = "no"), i.sorry(t);
          }
        },
      });
  },
  onPullDownRefresh: function () {
    var t = this;
    wx.vibrateShort({ type: "heavy" }),
      setTimeout(function () {
        wx.stopPullDownRefresh(),
          (n = 2),
          (o = !0),
          t.setData({ LIST: [] }),
          t.init();
      }, 500);
  },
  onReachBottom: function () {
    var i = this,
      s = this.data.LIST;
    o &&
      ((o = !1),
      i.setData({ loading_ico_flag: !0 }),
      e.ajax({
        url: "tg.php",
        data: { submitok: "TGU", p: n, t: i.data.t, openid: t.openid },
        success: function (t) {
          var e = t.LIST;
          if (e.length < 1)
            return (
              i.setData({
                loading_flag: !0,
                loading_ico_flag: !1,
                loading_str: "已全部加载完成",
              }),
              void (o = !1)
            );
          i.setData(a({}, "LIST[" + s.length + "]", e)), (n += 1), (o = !0);
        },
      }));
  },
  setloading: function (t, a) {
    "start" == t
      ? this.setData({ loading_flag: !0, loading_ico_flag: !0, loading_str: a })
      : this.setData({
          loading_flag: !1,
          loading_ico_flag: !1,
          loading_str: a,
        });
  },
  back: function () {
    this.setData({ div_login: !1 });
  },
  copywxFn: function (t) {
    i.copy_text({ data: this.data.OUT.weixin, msg: "复制成功" });
  },
  mask_closeFn: function (t) {
    var i = this,
      e = t.currentTarget.dataset.maskid;
    this.setData({
      mask_class: "alpha100_0",
      div_outlist_box_class: "div_upAnm2",
    }),
      setTimeout(function () {
        var t;
        i.setData(
          (a((t = {}), e, !1),
          a(t, "mask_class", "alpha0_100"),
          a(t, "div_outlist_box_class", "div_upAnm1"),
          t)
        );
      }, 500);
  },
  emptyFn: function () {},
  onShareAppMessage: function (t) {
    return {
      imageUrl: this.data.SHARE.imgurl,
      title: this.data.SHARE.title,
      path: "/pages/tg/my",
    };
  },
  onShareTimeline: function () {
    return {
      imageUrl: this.data.SHARE.imgurl,
      title: this.data.SHARE.title,
      query: "",
      path: "/pages/tg/my",
    };
  },
});
